package com.cskaoyan.controller;

import com.cskaoyan.bean.common.BaseRespVo;
import com.cskaoyan.bean.vo.admin_region.AdminRegionControllerVO;
import com.cskaoyan.service.AdminRegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: Ryan
 * @CreateTime: 2022-09-06  18:17
 */
@RestController
@RequestMapping("/admin/region/*")
public class AdminRegionController {
    @Autowired
    AdminRegionService adminRegionService;

    @RequestMapping("list")
    public BaseRespVo adminRegionList() {
        BaseRespVo<Object> baseRespVo = new BaseRespVo<>();
        baseRespVo.setErrmsg("成功");
        baseRespVo.setErrno(0);

        AdminRegionControllerVO adminRegionControllerVO = adminRegionService.getAdminRegionList();
        baseRespVo.setData(adminRegionControllerVO);
        return baseRespVo;
    }
}
